/**
 * Created by jiangtao on 16/7/5.
 */

var webpack = require('webpack');

var baseConfigInit = require('./webpack.base.config');

var baseConfig = baseConfigInit("PROD");

var prodConfig = {
    plugins:[
        new webpack.optimize.OccurrenceOrderPlugin(true),
        //js压缩参数
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false,
                drop_console: true
            },
            beautify:false,
            comments:false
        }),
        new webpack.DefinePlugin({
            'process.env': {
                NODE_ENV: '"production"'
            }
        }),
        new webpack.LoaderOptionsPlugin({
            minimize: true
        }),
        new webpack.optimize.MinChunkSizePlugin({
            minChunkSize: 51200, // ~50kb
        }),
    ]
};

baseConfig.output.publicPath = "http://47.93.199.212/";

baseConfig.plugins = prodConfig.plugins.concat( baseConfig.plugins );

module.exports = baseConfig;